package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallAdminAccount;
import com.appkubes.mall.core.po.MallAdminAccountExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallAdminAccountMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_admin_account
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallAdminAccountSqlProvider.class, method="countByExample")
    long countByExample(MallAdminAccountExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_admin_account
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallAdminAccountSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallAdminAccountExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_admin_account
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_admin_account",
        "where admin_key = #{adminKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String adminKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_admin_account
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_admin_account (admin_key, app_key, ",
        "alipay_account, version)",
        "values (#{adminKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{alipayAccount,jdbcType=VARCHAR}, #{version,jdbcType=INTEGER})"
    })
    int insert(MallAdminAccount record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_admin_account
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallAdminAccountSqlProvider.class, method="insertSelective")
    int insertSelective(MallAdminAccount record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_admin_account
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallAdminAccountSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="admin_key", property="adminKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="alipay_account", property="alipayAccount", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallAdminAccount> selectByExampleWithRowbounds(MallAdminAccountExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_admin_account
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallAdminAccountSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="admin_key", property="adminKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="alipay_account", property="alipayAccount", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallAdminAccount> selectByExample(MallAdminAccountExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_admin_account
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "admin_key, app_key, alipay_account, version",
        "from mall_admin_account",
        "where admin_key = #{adminKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="admin_key", property="adminKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="alipay_account", property="alipayAccount", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    MallAdminAccount selectByPrimaryKey(String adminKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_admin_account
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallAdminAccountSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallAdminAccount record, @Param("example") MallAdminAccountExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_admin_account
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallAdminAccountSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallAdminAccount record, @Param("example") MallAdminAccountExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_admin_account
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallAdminAccountSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallAdminAccount record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_admin_account
     *
     * @mbg.generated
     */
    @Update({
        "update mall_admin_account",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "alipay_account = #{alipayAccount,jdbcType=VARCHAR},",
          "version = #{version,jdbcType=INTEGER}",
        "where admin_key = #{adminKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallAdminAccount record);
}